
// PlayerAppDlg.h : header file
//

#pragma once


#include "..\VideoEditor\Classes\Player.h"
#include "..\VideoEditor\Classes\CDXGraph.h"


// CPlayerAppDlg dialog
class CPlayerAppDlg : public CDialog
{
// Construction
public:
	CPlayerAppDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_PLAYERAPP_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg LRESULT OnGraphNotify(WPARAM inWParam, LPARAM inLParam);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButtonOpen();
	afx_msg void OnBnClickedButtonPlay();
	LRESULT OnGraphBuilderNotify(WPARAM wParam, LPARAM lParam);

private:
	void SetTitle(CString openedFileName);
	Player m_player;
public:
	afx_msg void OnBnClickedButtonExit();

	afx_msg void OnBnClickedButtonSetScoreFont();
	afx_msg void OnBnClickedButtonChangeScore();

	void OnRecvPlayerMessage(MSG_TYPE msg_type);
	afx_msg void OnBnClickedButtonSave();
	afx_msg void OnBnClickedButtonOpenWithoutTitle();

private:
	bool ChooseFile(CString& fileName);
	void AdjustControlsSize();
	void MoveButton(int iID, int cx, int cy);
};
